<template>
    <div>
        <button @click="myClick">我是子组件{{name}}</button>
        <div>{{arr}}</div>

    </div>
</template>

<script>
    export default {
        props:["name","arr"],
        data() {
            return {
                goods:["衣服","帽子"],
                dudu:"嘟嘟"
            }
        },
        methods:{
            myClick(){
                this.$emit("haha",this.goods)
            }
        },
        mounted() {
            this.$emit("doudou",this.dudu)
        },
    }
</script>

<style scoped>

</style>